package com.cheetah.start.common.valid.anno;


import com.cheetah.start.common.valid.ValidPhoneValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * 手机参数校验
 *
 * @author 12392
 * @date 2021/07/27
 */
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = {ValidPhoneValidator.class})
public @interface Phone {
    String message() default "手机格式错误";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
